package com.ruoyi.project.ypjxc.domain;

import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Objects;

public class Drug extends BaseEntity {
    private Long drugId;
    private String drugName;
    private String drugCode;
    private String drugFactory;
    private String drugType;
    private String drugRecipetype;
    private String drugUnit;
    private Double drugPrice;
    private Double drugNum;
    private Double drugWaringnum;
    private int drugNumof;
    private String status;
    private YFactory factory;

    public Long getDrugId() {
        return drugId;
    }

    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    public String getDrugCode() {
        return drugCode;
    }

    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }

    public String getDrugFactory() {
        return drugFactory;
    }

    public void setDrugFactory(String drugFactory) {
        this.drugFactory = drugFactory;
    }

    public String getDrugType() {
        return drugType;
    }

    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    public String getDrugRecipetype() {
        return drugRecipetype;
    }

    public void setDrugRecipetype(String drugRecipetype) {
        this.drugRecipetype = drugRecipetype;
    }

    public String getDrugUnit() {
        return drugUnit;
    }

    public void setDrugUnit(String drugUnit) {
        this.drugUnit = drugUnit;
    }

    public Double getDrugPrice() {
        return drugPrice;
    }

    public void setDrugPrice(Double drugPrice) {
        this.drugPrice = drugPrice;
    }

    public Double getDrugNum() {
        return drugNum;
    }

    public void setDrugNum(Double drugNum) {
        this.drugNum = drugNum;
    }

    public Double getDrugWaringnum() {
        return drugWaringnum;
    }

    public void setDrugWaringnum(Double drugWaringnum) {
        this.drugWaringnum = drugWaringnum;
    }

    public int getDrugNumof() {
        return drugNumof;
    }

    public void setDrugNumof(int drugNumof) {
        this.drugNumof = drugNumof;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public YFactory getFactory() {
        return factory;
    }

    public void setFactory(YFactory factory) {
        this.factory = factory;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Drug drug = (Drug) o;
        return drugNumof == drug.drugNumof &&
                Objects.equals(drugId, drug.drugId) &&
                Objects.equals(drugName, drug.drugName) &&
                Objects.equals(drugCode, drug.drugCode) &&
                Objects.equals(drugFactory, drug.drugFactory) &&
                Objects.equals(drugType, drug.drugType) &&
                Objects.equals(drugRecipetype, drug.drugRecipetype) &&
                Objects.equals(drugUnit, drug.drugUnit) &&
                Objects.equals(drugPrice, drug.drugPrice) &&
                Objects.equals(drugNum, drug.drugNum) &&
                Objects.equals(drugWaringnum, drug.drugWaringnum) &&
                Objects.equals(status, drug.status) &&
                Objects.equals(factory, drug.factory);
    }

    @Override
    public int hashCode() {
        return Objects.hash(drugId, drugName, drugCode, drugFactory, drugType, drugRecipetype, drugUnit, drugPrice, drugNum, drugWaringnum, drugNumof, status, factory);
    }

    @Override
    public String toString() {
        return "Drug{" +
                "drugId=" + drugId +
                ", drugName='" + drugName + '\'' +
                ", drugCode='" + drugCode + '\'' +
                ", drugFactory='" + drugFactory + '\'' +
                ", drugType='" + drugType + '\'' +
                ", drugRecipetype='" + drugRecipetype + '\'' +
                ", drugUnit='" + drugUnit + '\'' +
                ", drugPrice=" + drugPrice +
                ", drugNum=" + drugNum +
                ", drugWaringnum=" + drugWaringnum +
                ", drugNumof=" + drugNumof +
                ", status='" + status + '\'' +
                ", factory=" + factory +
                '}';
    }

    public Drug(Long drugId, String drugName, String drugCode, String drugFactory, String drugType, String drugRecipetype, String drugUnit, Double drugPrice, Double drugNum, Double drugWaringnum, int drugNumof, String status, YFactory factory) {
        this.drugId = drugId;
        this.drugName = drugName;
        this.drugCode = drugCode;
        this.drugFactory = drugFactory;
        this.drugType = drugType;
        this.drugRecipetype = drugRecipetype;
        this.drugUnit = drugUnit;
        this.drugPrice = drugPrice;
        this.drugNum = drugNum;
        this.drugWaringnum = drugWaringnum;
        this.drugNumof = drugNumof;
        this.status = status;
        this.factory = factory;
    }

    public Drug() {
    }
}
